<?php get_header(); ?>

<?php $feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>

<div class="news news-detail only-news">
  <div class="date">
    <div class="bar"></div>
    <div class="date-info">
      <h2><?php echo strftime('%d',strtotime($post->post_date)); ?></h2>
      <p><?php echo strftime('%b',strtotime($post->post_date)); ?></p>
    </div>
  </div>
  <div class="news-header">
    <h2><a href="<?php echo get_permalink($post->ID); ?>"><?php echo $post->post_title; ?></a></h2>
    <div class="share">
      <?php echo do_shortcode('[wpsr_facebook]'); ?>
      <?php echo do_shortcode('[wpsr_retweet]'); ?>
      <?php echo do_shortcode('[wpsr_plusone]'); ?>
    </div>
  </div>
  <div class="news-content">
    <div class="pic-container vshadow4">
      <img src="<?php echo $feat_image; ?>" />
      <hr />
    </div>
    <?php echo wpautop($post->post_content); ?>
  </div>
  
  <div class="navigation">
    <?php
    $prev_post = get_previous_post(true);
    if (!empty( $prev_post )): ?>
      <a class="btn" href="<?php echo get_permalink( $prev_post->ID ); ?>">&laquo; Sebelumnya</a>
    <?php endif; ?>
    
    <?php
    $next_post = get_next_post(true);
    if (!empty( $next_post )): ?>
      <a class="btn" href="<?php echo get_permalink( $next_post->ID ); ?>">Selanjutnya &raquo;</a>
    <?php endif; ?>
    
    <div class="clear"></div>
  </div>
</div>

<?php get_footer(); ?>